//
//  SecondViewController.m
//  homework_UITabBarController
//
//  Created by dllo on 16/6/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SecondViewController.h"

#import "SecondScrollView.h"

@interface SecondViewController ()

@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationItem.title = @"第二页";
    [self createSubView];
}

-(void)createSubView
{
//    NSMutableArray *array = [NSMutableArray array];
//    
//    for (int j = 4; j <= 9; j++) {
//        UIImage *image = [UIImage imageNamed:@"%d.png", j];
//        [array addObject:image];
//    }
    
    UIImage *image1 = [UIImage imageNamed:@"4.png"];
    UIImage *image2 = [UIImage imageNamed:@"5.png"];
    UIImage *image3 = [UIImage imageNamed:@"6.png"];
    UIImage *image4 = [UIImage imageNamed:@"7.png"];
    UIImage *image5 = [UIImage imageNamed:@"8.png"];
    UIImage *image6 = [UIImage imageNamed:@"9.png"];
    
    NSArray *array = @[image1, image2, image3, image4, image5, image6];
    SecondScrollView *scrollView = [[SecondScrollView alloc]initWithFrame:self.view.frame];
    scrollView.center = self.view.center;
    
    scrollView.backgroundColor = [UIColor whiteColor];
    
    [self.view addSubview:scrollView];
    
    [scrollView addPicture:array];
    
}


@end
